#include "processBar.h"

typedef void(*callback_t)(int);

void download(callback_t cb)
{
    int all = 1000;
    int now = 0;
    while(now<=all)
    {
        cb(now*100/all);
        now+=10;
        usleep(50000);
    }
    printf("\n");
}





int main()
{
    download(processBarCore);

    //processBar(10);
    //int cnt = 11;
   //while(--cnt >= 0)
    //{
    //.autorelabel    printf("%-2d\r", cnt);
  //      fflush(stdout);
    //    sleep(1);
   // }
    //usrprintf("\n");
    return 0;
}
